package com.example.demo.config.recode;

import lombok.Data;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

@Data
public class ReCodeAuthenticationToken extends AbstractAuthenticationToken {
    private Object principal;
    private Object credentials;
    public ReCodeAuthenticationToken() {
        super(null);
    }
    public ReCodeAuthenticationToken(Object principal,
                                     Collection<? extends GrantedAuthority> authorities) {
        super(authorities);
        this.principal = principal;
        super.setAuthenticated(true);
    }
}

